using System;
using System.Collections.Generic;
using System.Text;

namespace Pbdms.NetworkDealer.EventArgs
{
    /// <summary>
    /// define an event argument passed when a DownLoadClientReady event is triggered
    /// </summary>
    public class DownloadClientReadyEventArgs: System.EventArgs
    {
        readonly int clientPort;
        readonly string clientIpAdd;
        readonly string fileName;

        /// <summary>
        /// name of the file to be downloaded
        /// </summary>
        public string FileName
        {
            get { return fileName; }
        } 

        /// <summary>
        /// ip of the client
        /// </summary>
        public string ClientIpAdd
        {
            get { return clientIpAdd; }
        } 

        /// <summary>
        /// port to which data will be sent
        /// </summary>
        public int ClientPort
        {
            get { return clientPort; }
        }

        
        readonly string requestedItemId;

        /// <summary>
        /// ID of the item being requested
        /// </summary>
        public string RequestedItemId
        {
            get { return requestedItemId; }
        } 

        /// <summary>
        /// create an instance
        /// </summary>
        /// <param name="clientIpAdd"></param>
        /// <param name="clientPort"></param>
        /// <param name="requestedItemId"></param>
        /// <param name="fileName"></param>
        public DownloadClientReadyEventArgs(string clientIpAdd, int clientPort, string requestedItemId, string fileName)
        {
            this.clientIpAdd = clientIpAdd;
            this.clientPort = clientPort;
            this.requestedItemId = requestedItemId;
            this.fileName = fileName;
        }
    }
}
